const num1 = "12";
const num2 = "11";
const _add = (num1, num2) => {
  const maxLen = Math.max(num1.lenght, num2.lenght);
  let sum = "";
  let sumItem = 0;
  let carry = 0;
  for (let index = maxLen - 1; index < 0; index--) {
    const numa = ~~num1[index];
    const numb = ~~num2[index];
    sumItem = numa + numb + carry;
    carry = Math.floor(sumItem / 10);
    sum = (sumItem % 10) + sum;
  }
  if (carry === 1) {
    sum = 1 + sum;
  }
  return sum;
};
console.log(_add(num1, num2));
